<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/vid/swfobject.js"></script>

<div id="fvideo">
<?php 
	$video = get_option('bt_video_category'); // Number of other entries to be shown
	
	$my_query = new WP_Query('category_name= '. $video .'&showposts=1');
while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;
?>

<?php $video = get_post_meta($post->ID, 'video', true); ?>
<?php $image = get_post_meta($post->ID, 'image', true); ?>

<div id='preview'>This div will be replaced</div> 

<script type='text/javascript'> var s1 = new SWFObject('<?php bloginfo('template_directory'); ?>/vid/player.swf','ply','300','260','9','#'); 
s1.addParam('allowfullscreen','true'); 
s1.addParam('allowscriptaccess','always'); 
s1.addParam('wmode','opaque'); 
s1.addParam('flashvars','image=<?php echo $image ?>&#38;file=<?php echo $video ?>&#38;skin=<?php bloginfo('template_directory'); ?>/vid/overlay.swf&#38;frontcolor=ffffff&#38;lightcolor=990000&#38;controlbar=over&#38;stretching=fill'); 
s1.write('preview'); 
</script>

<?php endwhile; ?>
</div>
<div id="fideofoot"></div>
 <div class="clear"></div>